package object.obj3D.enemy;

import object.obj2D.bullet.IBullet;
import object.obj3D.Object3D;
import MD2Model.MD2Model;
import MD2Model.Vector3;

import com.game.AI.BaseAI;

public abstract class Character extends Object3D {
	protected double m_dLastUpdate = 0;
	protected Vector3 m_position  = new Vector3(0,0,0);
	protected BaseAI m_AI;
	
	protected int m_status = ECharStatus.MOVE;
	
	public float m_speedX;
	public float m_speedZ;
	
	private int m_iHP;
	
	public Character(MD2Model obj, Vector3 position){
		super(obj);
		m_position = position;
		SetTranslateX(position.GetX());
		SetTranslateY(position.GetY());
		SetTranslateZ(position.GetZ());
	}
	
	public Character(int modelID, int resTexID, boolean isLoop) {
		super(modelID, resTexID, isLoop);
		// TODO Auto-generated constructor stub
	}
	
	public Vector3 GetPosition(){
		return m_position;
	}
	
	public void Render(){
		super.Render();
	}
	
	public abstract void InModeStand();
	public abstract void InModeMove();
	public abstract void InModeInjured();
	public abstract void InModeDie();
	public abstract void InModeAttack();
	
	public void Update()
	{
		model.SetAnimation(AnimIndex, FrameIndex);
		FrameIndex = model.NextFrame(FrameIndex);
	}
	public abstract IBullet Fire();
	public abstract void MoveTo(Vector3 destination);
	
	public int GetCurrentHP(){
		return m_iHP;
	}

	public void SetCurrentHP(int HP){
		m_iHP = HP;
	}
}
